package com.example.weli.ble2test;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog.Builder;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;

public class SettingActivity extends Activity {
    boolean B10_viable;
    boolean B11_viable;
    boolean B12_viable;
    boolean B1_viable;
    boolean B2_viable;
    boolean B3_viable;
    boolean B4_viable;
    boolean B5_viable;
    boolean B6_viable;
    boolean B7_viable;
    boolean B8_viable;
    boolean B9_viable;
    String LED1_name;
    boolean LED1_viable;
    String LED2_name;
    boolean LED2_viable;
    String LED3_name;
    boolean LED3_viable;
    String LED4_name;
    boolean LED4_viable;
    String LED5_name;
    boolean LED5_viable;
    String LED6_name;
    boolean LED6_viable;
    String LED7_name;
    boolean LED7_viable;
    String LED8_name;
    boolean LED8_viable;
    boolean P1_viable;
    boolean P2_viable;
    boolean P3_viable;
    boolean P4_viable;
    boolean P5_viable;
    boolean P6_viable;
    UserListAdapter adapter;
    Button btncanle;
    Button btnok;
    String button10_name;
    String button10_send;
    String button11_name;
    String button11_send;
    String button12_name;
    String button12_send;
    String button1_name;
    String button1_send;
    String button2_name;
    String button2_send;
    String button3_name;
    String button3_send;
    String button4_name;
    String button4_send;
    String button5_name;
    String button5_send;
    String button6_name;
    String button6_send;
    String button7_name;
    String button7_send;
    String button8_name;
    String button8_send;
    String button9_name;
    String button9_send;
    int lay_temp;
    public OnItemClickListener listclick = new OnItemClickListener() {
        public void onItemClick(AdapterView<?> adapterView, View V, int position, long id) {
            SettingActivity.this.top.setText("onItemClick position:" + position + " id = " + id);
            switch (position) {
                case joystick.COORDINATE_CARTESIAN /*0*/:
                    SettingActivity.this.laySeting("\u8bbe\u7f6e\u6ed1\u6761[1]\u7684\u5c5e\u6027", position, SettingActivity.this.slider1_name, String.valueOf(SettingActivity.this.slider1_value), SettingActivity.this.s1_viable);
                    return;
                case joystick.COORDINATE_DIFFERENTIAL /*1*/:
                    SettingActivity.this.laySeting("\u8bbe\u7f6e\u6ed1\u6761[2]\u7684\u5c5e\u6027", position, SettingActivity.this.slider2_name, String.valueOf(SettingActivity.this.slider2_value), SettingActivity.this.s1_viable);
                    return;
                case UIActivity.xconnected /*2*/:
                    SettingActivity.this.laySeting("\u8bbe\u7f6e\u6ed1\u6761[3]\u7684\u5c5e\u6027", position, SettingActivity.this.slider3_name, String.valueOf(SettingActivity.this.slider3_value), SettingActivity.this.s1_viable);
                    return;
                case UIActivity.xtransfing /*3*/:
                    SettingActivity.this.LEDSeting("\u8bbe\u7f6eLED[1]\u7684\u5c5e\u6027", position, SettingActivity.this.LED1_name, SettingActivity.this.LED1_viable);
                    return;
                case UIActivity.xend /*4*/:
                    SettingActivity.this.LEDSeting("\u8bbe\u7f6eLED[2]\u7684\u5c5e\u6027", position, SettingActivity.this.LED2_name, SettingActivity.this.LED2_viable);
                    return;
                case UIActivity.idle /*5*/:
                    SettingActivity.this.LEDSeting("\u8bbe\u7f6eLED[3]\u7684\u5c5e\u6027", position, SettingActivity.this.LED3_name, SettingActivity.this.LED3_viable);
                    return;
//                case UIActivity.TCP_READ /*6*/:
//                    SettingActivity.this.LEDSeting("\u8bbe\u7f6eLED[4]\u7684\u5c5e\u6027", position, SettingActivity.this.LED4_name, SettingActivity.this.LED4_viable);
//                    return;
                case UIActivity.TCP_CHANGE /*7*/:
                    SettingActivity.this.LEDSeting("\u8bbe\u7f6eLED[1]\u7684\u5c5e\u6027", position, SettingActivity.this.LED5_name, SettingActivity.this.LED5_viable);
                    return;
                case R.styleable.Toolbar_contentInsetRight /*8*/:
                    SettingActivity.this.LEDSeting("\u8bbe\u7f6eLED[2]\u7684\u5c5e\u6027", position, SettingActivity.this.LED6_name, SettingActivity.this.LED6_viable);
                    return;
                case R.styleable.Toolbar_contentInsetStartWithNavigation /*9*/:
                    SettingActivity.this.LEDSeting("\u8bbe\u7f6eLED[3]\u7684\u5c5e\u6027", position, SettingActivity.this.LED7_name, SettingActivity.this.LED7_viable);
                    return;
                case R.styleable.Toolbar_contentInsetEndWithActions /*10*/:
                    SettingActivity.this.LEDSeting("\u8bbe\u7f6eLED[4]\u7684\u5c5e\u6027", position, SettingActivity.this.LED8_name, SettingActivity.this.LED8_viable);
                    return;
                case R.styleable.Toolbar_popupTheme /*11*/:
                    SettingActivity.this.parSeting("\u8bbe\u7f6e\u56de\u4f20\u53c2\u6570[1]\u7684\u5c5e\u6027", position, SettingActivity.this.partm1_name, String.valueOf(SettingActivity.this.partm1_scale), SettingActivity.this.P1_viable);
                    return;
                case R.styleable.Toolbar_titleTextAppearance /*12*/:
                    SettingActivity.this.parSeting("\u8bbe\u7f6e\u56de\u4f20\u53c2\u6570[2]\u7684\u5c5e\u6027", position, SettingActivity.this.partm2_name, String.valueOf(SettingActivity.this.partm2_scale), SettingActivity.this.P2_viable);
                    return;
                case R.styleable.Toolbar_subtitleTextAppearance /*13*/:
                    SettingActivity.this.parSeting("\u8bbe\u7f6e\u56de\u4f20\u53c2\u6570[3]\u7684\u5c5e\u6027", position, SettingActivity.this.partm3_name, String.valueOf(SettingActivity.this.partm3_scale), SettingActivity.this.P3_viable);
                    return;
                case R.styleable.Toolbar_titleMargin /*14*/:
                    SettingActivity.this.parSeting("\u8bbe\u7f6e\u56de\u4f20\u53c2\u6570[4]\u7684\u5c5e\u6027", position, SettingActivity.this.partm4_name, String.valueOf(SettingActivity.this.partm4_scale), SettingActivity.this.P4_viable);
                    return;
                case R.styleable.Toolbar_titleMarginStart /*15*/:
                    SettingActivity.this.parSeting("\u8bbe\u7f6e\u56de\u4f20\u53c2\u6570[5]\u7684\u5c5e\u6027", position, SettingActivity.this.partm5_name, String.valueOf(SettingActivity.this.partm5_scale), SettingActivity.this.P5_viable);
                    return;
                case R.styleable.Toolbar_titleMarginEnd /*16*/:
                    SettingActivity.this.parSeting("\u8bbe\u7f6e\u56de\u4f20\u53c2\u6570[6]\u7684\u5c5e\u6027", position, SettingActivity.this.partm6_name, String.valueOf(SettingActivity.this.partm6_scale), SettingActivity.this.P6_viable);
                    return;
                case R.styleable.Toolbar_titleMarginTop /*17*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[1]\u7684\u5c5e\u6027", position, SettingActivity.this.button1_name, SettingActivity.this.button1_send, SettingActivity.this.B1_viable);
                    return;
                case R.styleable.Toolbar_titleMarginBottom /*18*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[2]\u7684\u5c5e\u6027", position, SettingActivity.this.button2_name, SettingActivity.this.button2_send, SettingActivity.this.B2_viable);
                    return;
                case R.styleable.Toolbar_titleMargins /*19*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[3]\u7684\u5c5e\u6027", position, SettingActivity.this.button3_name, SettingActivity.this.button3_send, SettingActivity.this.B3_viable);
                    return;
                case R.styleable.Toolbar_maxButtonHeight /*20*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[4]\u7684\u5c5e\u6027", position, SettingActivity.this.button4_name, SettingActivity.this.button4_send, SettingActivity.this.B4_viable);
                    return;
//                case R.styleable.Toolbar_buttonGravity /*21*/:
//                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[5]\u7684\u5c5e\u6027", position, SettingActivity.this.button5_name, SettingActivity.this.button5_send, SettingActivity.this.B5_viable);
//                    return;
//                case R.styleable.Toolbar_collapseIcon /*22*/:
//                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[6]\u7684\u5c5e\u6027", position, SettingActivity.this.button6_name, SettingActivity.this.button6_send, SettingActivity.this.B6_viable);
//                    return;
//                case R.styleable.Toolbar_collapseContentDescription /*23*/:
//                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[7]\u7684\u5c5e\u6027", position, SettingActivity.this.button7_name, SettingActivity.this.button7_send, SettingActivity.this.B7_viable);
//                    return;
                case R.styleable.Toolbar_navigationIcon /*24*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[8]\u7684\u5c5e\u6027", position, SettingActivity.this.button8_name, SettingActivity.this.button8_send, SettingActivity.this.B8_viable);
                    return;
                case R.styleable.Toolbar_navigationContentDescription /*25*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[9]\u7684\u5c5e\u6027", position, SettingActivity.this.button9_name, SettingActivity.this.button9_send, SettingActivity.this.B9_viable);
                    return;
                case R.styleable.Toolbar_logoDescription /*26*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[10]\u7684\u5c5e\u6027", position, SettingActivity.this.button10_name, SettingActivity.this.button10_send, SettingActivity.this.B10_viable);
                    return;
                case R.styleable.Toolbar_titleTextColor /*27*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[11]\u7684\u5c5e\u6027", position, SettingActivity.this.button11_name, SettingActivity.this.button11_send, SettingActivity.this.B11_viable);
                    return;
                case R.styleable.Toolbar_subtitleTextColor /*28*/:
                    SettingActivity.this.sedSeting("\u8bbe\u7f6e\u6309\u952e[12]\u7684\u5c5e\u6027", position, SettingActivity.this.button12_name, SettingActivity.this.button12_send, SettingActivity.this.B12_viable);
                    return;
                default:
                    return;
            }
        }
    };
    ListView listview;
    Button loaddef;
    ProgressDialog mydialog;
    List<User> myusers = new ArrayList();
    String partm1_name;
    float partm1_scale;
    String partm2_name;
    float partm2_scale;
    String partm3_name;
    float partm3_scale;
    String partm4_name;
    float partm4_scale;
    String partm5_name;
    float partm5_scale;
    String partm6_name;
    float partm6_scale;
    boolean s1_viable;
    boolean s2_viable;
    boolean s3_viable;
    String slider1_name;
    int slider1_value;
    String slider2_name;
    int slider2_value;
    String slider3_name;
    int slider3_value;
    TextView top;
    User user = new User("\u63a7\u4ef6\u540d\u5b57", "\u6807\u8bc6", "\u5f53\u524d\u8bbe\u7f6e\u7684\u503c");

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.setlist);
        setTitle("\u5730\u9762\u7ad9\u63a7\u4ef6\u8bbe\u7f6e");
        loaddata();
        this.myusers = loaddefault();
        this.listview = (ListView) findViewById(R.id.setlist);
        this.top = (TextView) findViewById(R.id.setttext);
        this.adapter = new UserListAdapter(this, R.layout.listsetting, this.myusers);
        this.listview.setAdapter(this.adapter);
        this.listview.setOnItemClickListener(this.listclick);
        this.btnok = (Button) findViewById(R.id.bunsetok);
        this.btncanle = (Button) findViewById(R.id.cancelset);
        this.loaddef = (Button) findViewById(R.id.loaddefault);
        this.btnok.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                SettingActivity.this.writedata();
                SettingActivity.this.finish();
            }
        });
        this.btncanle.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                SettingActivity.this.finish();
            }
        });
        this.loaddef.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                new Builder(SettingActivity.this).setTitle("\u8b66\u544a").setIcon(R.drawable.avrubd1).setMessage("\u8fd8\u539f\u9ed8\u8ba4\u503c\u5c06\u4f1a\u4e22\u5931\u5f53\u524d\u8bbe\u7f6e\uff0c\u4f60\u786e\u5b9a\u8fd9\u6837\u505a\u5417\uff1f\r\r\u8fd8\u539f\u540e\u8bf7\u91cd\u542f\u8bbe\u7f6e\u9762\u677f").setPositiveButton("\u8fd8\u539f\u9ed8\u8ba4", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                        SettingActivity.this.Setdefaultdata();
                        SettingActivity.this.finish();
                    }
                }).setNegativeButton("\u53d6\u6d88", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                    }
                }).show();
            }
        });
    }

    protected void onDestroy() {
        super.onDestroy();
    }

    public List<User> loaddefault() {
        List<User> users = new ArrayList();
        String cansee = "  \u53ef\u89c1\u7684";
        String nosee = "  \u4e0d\u53ef\u89c1";
        if (this.s1_viable) {
            users.add(new User("\u6ed1\u6761[\u7ea2\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 :" + this.slider1_name, "\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider1_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F1 [Value] [checksum] AA"));
        } else {
            users.add(new User("\u6ed1\u6761[\u7ea2\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 :" + this.slider1_name, "\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider1_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F1 [Value] [checksum] AA"));
        }
        if (this.s2_viable) {
            users.add(new User("\u6ed1\u6761 [\u7eff\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 :" + this.slider2_name, "\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider2_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F2 [Value] [checksum] AA"));
        } else {
            users.add(new User("\u6ed1\u6761 [\u7eff\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 :" + this.slider2_name, "\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider2_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F2 [Value] [checksum] AA"));
        }
        if (this.s3_viable) {
            users.add(new User("\u6ed1\u6761 [\u84dd\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 :" + this.slider3_name, "\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider3_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F3 [Value] [checksum] AA"));
        } else {
            users.add(new User("\u6ed1\u6761 [\u84dd\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 :" + this.slider3_name, "\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider3_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F3 [Value] [checksum] AA"));
        }
        if (this.LED1_viable) {
            users.add(new User("LED1 [\u84dd\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 :" + this.LED1_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E1 01 E7 AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E1 00 E6 AA"));
        } else {
            users.add(new User("LED1 [\u84dd\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 :" + this.LED1_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E1 01 E7 AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E1 00 E6 AA"));
        }
        if (this.LED2_viable) {
            users.add(new User("LED2 [\u7eff\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.LED2_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E2 01 E8 AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E2 00 E7 AA"));
        } else {
            users.add(new User("LED2 [\u7eff\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.LED2_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E2 01 E8 AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E2 00 E7 AA"));
        }
        if (this.LED3_viable) {
            users.add(new User("LED3 [\u7ea2\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.LED3_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E3 01 E9 AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E3 00 E8 AA"));
        } else {
            users.add(new User("LED3 [\u7ea2\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.LED3_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E3 01 E9 AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E3 00 E8 AA"));
        }
        if (this.LED4_viable) {
            users.add(new User("LED4 [\u9ec4\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.LED4_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E4 01 EA AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E4 00 E9 AA"));
        } else {
            users.add(new User("LED4 [\u9ec4\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.LED4_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E4 01 EA AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E4 00 E9 AA"));
        }
        if (this.LED5_viable) {
            users.add(new User("LED5 [\u84dd\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 :" + this.LED5_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E5 01 EB AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E5 00 EA AA"));
        } else {
            users.add(new User("LED5 [\u84dd\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 :" + this.LED5_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E5 01 EB AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E5 00 EA AA"));
        }
        if (this.LED6_viable) {
            users.add(new User("LED6 [\u7eff\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.LED6_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E6 01 EC AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E6 00 EB AA"));
        } else {
            users.add(new User("LED6 [\u7eff\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.LED6_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E6 01 EC AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E6 00 EB AA"));
        }
        if (this.LED7_viable) {
            users.add(new User("LED7 [\u7ea2\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.LED7_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E7 01 ED AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E7 00 EC AA"));
        } else {
            users.add(new User("LED7 [\u7ea2\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.LED7_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E7 01 ED AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E7 00 EC AA"));
        }
        if (this.LED8_viable) {
            users.add(new User("LED8 [\u9ec4\u8272]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.LED8_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E8 01 EE AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E8 00 ED AA"));
        } else {
            users.add(new User("LED8 [\u9ec4\u8272]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.LED8_name, "\u70b9\u4eae\u547d\u4ee4: A5 5A 05 E8 01 EE AA\r\n\u7184\u706d\u547d\u4ee4: A5 5A 05 E8 00 ED AA"));
        }
        if (this.P1_viable) {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [1]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.partm1_name, "\u500d\u6570:" + String.valueOf(this.partm1_scale)));
        } else {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [1]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.partm1_name, "\u500d\u6570:" + String.valueOf(this.partm1_scale)));
        }
        if (this.P2_viable) {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [2]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.partm2_name, "\u500d\u6570:" + String.valueOf(this.partm2_scale)));
        } else {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [2]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.partm2_name, "\u500d\u6570:" + String.valueOf(this.partm2_scale)));
        }
        if (this.P3_viable) {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [3]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.partm3_name, "\u500d\u6570:" + String.valueOf(this.partm3_scale)));
        } else {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [3]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.partm3_name, "\u500d\u6570:" + String.valueOf(this.partm3_scale)));
        }
        if (this.P4_viable) {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [4]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.partm4_name, "\u500d\u6570:" + String.valueOf(this.partm4_scale)));
        } else {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [4]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.partm4_name, "\u500d\u6570:" + String.valueOf(this.partm4_scale)));
        }
        if (this.P5_viable) {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [5]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.partm5_name, "\u500d\u6570:" + String.valueOf(this.partm5_scale)));
        } else {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [5]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.partm5_name, "\u500d\u6570:" + String.valueOf(this.partm5_scale)));
        }
        if (this.P6_viable) {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [6]" + cansee, "\u663e\u793a\u540d\u79f0 : " + this.partm6_name, "\u500d\u6570:" + String.valueOf(this.partm6_scale)));
        } else {
            users.add(new User("\u8fd4\u56de\u53c2\u6570 [6]" + nosee, "\u663e\u793a\u540d\u79f0 : " + this.partm6_name, "\u500d\u6570:" + String.valueOf(this.partm6_scale)));
        }
        if (this.B1_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[1]" + cansee, this.button1_name, "\u70b9\u51fb\u53d1\u9001:" + this.button1_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[1]" + nosee, this.button1_name, "\u70b9\u51fb\u53d1\u9001:" + this.button1_send));
        }
        if (this.B2_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[2]" + cansee, this.button2_name, "\u70b9\u51fb\u53d1\u9001:" + this.button2_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[2]" + nosee, this.button2_name, "\u70b9\u51fb\u53d1\u9001:" + this.button2_send));
        }
        if (this.B3_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[3]" + cansee, this.button3_name, "\u70b9\u51fb\u53d1\u9001:" + this.button3_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[3]" + nosee, this.button3_name, "\u70b9\u51fb\u53d1\u9001:" + this.button3_send));
        }
        if (this.B4_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[4]" + cansee, this.button4_name, "\u70b9\u51fb\u53d1\u9001:" + this.button4_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[4]" + nosee, this.button4_name, "\u70b9\u51fb\u53d1\u9001:" + this.button4_send));
        }
        if (this.B5_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[5]" + cansee, this.button5_name, "\u70b9\u51fb\u53d1\u9001:" + this.button5_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[5]" + nosee, this.button5_name, "\u70b9\u51fb\u53d1\u9001:" + this.button5_send));
        }
        if (this.B6_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[6]" + cansee, this.button6_name, "\u70b9\u51fb\u53d1\u9001:" + this.button6_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[6]" + nosee, this.button6_name, "\u70b9\u51fb\u53d1\u9001:" + this.button6_send));
        }
        if (this.B7_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[7]" + cansee, this.button7_name, "\u70b9\u51fb\u53d1\u9001:" + this.button7_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[7]" + nosee, this.button7_name, "\u70b9\u51fb\u53d1\u9001:" + this.button7_send));
        }
        if (this.B8_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[8]" + cansee, this.button8_name, "\u70b9\u51fb\u53d1\u9001:" + this.button8_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[8]" + nosee, this.button8_name, "\u70b9\u51fb\u53d1\u9001:" + this.button8_send));
        }
        if (this.B9_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[9]" + cansee, this.button9_name, "\u70b9\u51fb\u53d1\u9001:" + this.button9_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[9]" + nosee, this.button9_name, "\u70b9\u51fb\u53d1\u9001:" + this.button9_send));
        }
        if (this.B10_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[10]" + cansee, this.button10_name, "\u70b9\u51fb\u53d1\u9001:" + this.button10_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[10]" + nosee, this.button10_name, "\u70b9\u51fb\u53d1\u9001:" + this.button10_send));
        }
        if (this.B11_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[11]" + cansee, this.button11_name, "\u70b9\u51fb\u53d1\u9001:" + this.button11_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[11]" + nosee, this.button11_name, "\u70b9\u51fb\u53d1\u9001:" + this.button11_send));
        }
        if (this.B12_viable) {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[12]" + cansee, this.button12_name, "\u70b9\u51fb\u53d1\u9001:" + this.button12_send));
        } else {
            users.add(new User("\u81ea\u5b9a\u4e49\u6309\u952e[12]" + nosee, this.button12_name, "\u70b9\u51fb\u53d1\u9001:" + this.button12_send));
        }
        return users;
    }

    public static boolean isNumeric(String str) {
        int i = 0;
        while (i < str.length()) {
            if (!Character.isDigit(str.charAt(i)) && str.charAt(i) != '.') {
                return false;
            }
            i++;
        }
        return true;
    }

    @SuppressLint("WrongConstant")
    public boolean isHEX(String str) {
        if (str.length() % 2 != 0) {
            Toast.makeText(this, "\u4fee\u6539\u5931\u8d25\uff0c\u8bf7\u7f16\u5199\u5b8c\u6574\u7684\u5341\u516d\u8fdb\u5236\u6570\u636e\r\n1.\u8bf7\u4e0d\u8981\u52a0\u7a7a\u683c\r\n2.\u9ad8\u4f4d\u4e3a0\u65f6\u8bf7\u628a0\u5199\u4e0a", 1).show();
            return false;
        }
        int i = 0;
        while (i < str.length()) {
            if (Character.isDigit(str.charAt(i)) || str.charAt(i) == 'F' || str.charAt(i) == 'A' || str.charAt(i) == 'B' || str.charAt(i) == 'C' || str.charAt(i) == 'D' || str.charAt(i) == 'E' || str.charAt(i) == 'a' || str.charAt(i) == 'b' || str.charAt(i) == 'c' || str.charAt(i) == 'd' || str.charAt(i) == 'e' || str.charAt(i) == 'f') {
                i++;
            } else {
                Toast.makeText(this, "\u4fee\u6539\u5931\u8d25\uff0c\u8bf7\u6b63\u786e\u7f16\u5199\u5341\u516d\u8fdb\u5236\u6570\u636e\r\n\u8f93\u5165\u6570\u5b570-9\u5b57\u6bcdA-F", 1).show();
                return false;
            }
        }
        return true;
    }

    private void laySeting(String Title, final int position, String name, String value, boolean vis) {
        View addView = LayoutInflater.from(this).inflate(R.layout.add_edit, null);
        final DialogWrapper wrapper = new DialogWrapper(addView);
        wrapper.setnametext(name);
        wrapper.setvaluetext(value);
        wrapper.set_vis(vis);
        new Builder(this).setTitle(Title).setView(addView).setPositiveButton("\u786e\u5b9a", new DialogInterface.OnClickListener() {
            @SuppressLint("WrongConstant")
            public void onClick(DialogInterface dialog, int whichButton) {
                String tempstr = wrapper.getValueField().getText().toString();
                if (SettingActivity.isNumeric(tempstr)) {
                    SettingActivity.this.lay_temp = Integer.valueOf(tempstr).intValue();
                    if (SettingActivity.this.lay_temp < 256) {
                        SettingActivity.this.set_editor(wrapper.getTitleField().getText().toString(), wrapper.getValueField().getText().toString(), position, wrapper.read_vis());
                        SettingActivity.this.adapter.notifyDataSetChanged();
                        return;
                    }
                    Toast.makeText(SettingActivity.this.getApplicationContext(), "\u4fee\u6539\u5931\u8d25\r\n\u3010\u6ed1\u6761\u6700\u5927\u503c\u3011\u6700\u5927\u53ea\u80fd\u8f93\u5165255", 1).show();
                    return;
                }
                Toast.makeText(SettingActivity.this.getApplicationContext(), "\u4fee\u6539\u5931\u8d25\r\n\u8bf7\u8f93\u5165\u6570\u5b57", 1).show();
            }
        }).setNegativeButton("\u53d6\u6d88", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
            }
        }).show();
    }

    private void sedSeting(String Title, final int position, String name, String value, boolean vis) {
        View addView = LayoutInflater.from(this).inflate(R.layout.add_editsed, null);
        final DialogWrapper wrapper = new DialogWrapper(addView);
        wrapper.setnametext(name);
        wrapper.setvaluetext(value);
        wrapper.set_vis(vis);
        new Builder(this).setTitle(Title).setView(addView).setPositiveButton("\u786e\u5b9a", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                if (SettingActivity.this.isHEX(wrapper.getValueField().getText().toString())) {
                    SettingActivity.this.set_editor(wrapper.getTitleField().getText().toString(), wrapper.getValueField().getText().toString(), position, wrapper.read_vis());
                    SettingActivity.this.adapter.notifyDataSetChanged();
                }
            }
        }).setNegativeButton("\u53d6\u6d88", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
            }
        }).show();
    }

    private void parSeting(String Title, final int position, String name, String value, boolean vis) {
        View addView = LayoutInflater.from(this).inflate(R.layout.add_editpar, null);
        final DialogWrapper wrapper = new DialogWrapper(addView);
        wrapper.set_vis(vis);
        wrapper.setnametext(name);
        wrapper.setvaluetext(value);
        new Builder(this).setTitle(Title).setView(addView).setPositiveButton("\u786e\u5b9a", new DialogInterface.OnClickListener() {
            @SuppressLint("WrongConstant")
            public void onClick(DialogInterface dialog, int whichButton) {
                if (SettingActivity.isNumeric(wrapper.getValueField().getText().toString())) {
                    SettingActivity.this.set_editor(wrapper.getTitleField().getText().toString(), wrapper.getValueField().getText().toString(), position, wrapper.read_vis());
                    SettingActivity.this.adapter.notifyDataSetChanged();
                    return;
                }
                Toast.makeText(SettingActivity.this.getApplicationContext(), "\u4fee\u6539\u5931\u8d25\r\n\u8bf7\u8f93\u5165\u6570\u5b57", 1).show();
            }
        }).setNegativeButton("\u53d6\u6d88", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
            }
        }).show();
    }

    private void LEDSeting(String Title, final int position, String name, boolean vis) {
        View addView = LayoutInflater.from(this).inflate(R.layout.add_editled, null);
        final DialogWrapper wrapper = new DialogWrapper(addView);
        wrapper.setnametext(name);
        wrapper.set_vis(vis);
        new Builder(this).setTitle(Title).setView(addView).setPositiveButton("\u786e\u5b9a", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                SettingActivity.this.set_editor(wrapper.getTitleField().getText().toString(), wrapper.getValueField().getText().toString(), position, wrapper.read_vis());
                SettingActivity.this.adapter.notifyDataSetChanged();
            }
        }).setNegativeButton("\u53d6\u6d88", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
            }
        }).show();
    }

    public void set_editor(String name, String value, int position, boolean vis) {
        String cansee = "  \u53ef\u89c1\u7684";
        String nosee = "  \u4e0d\u53ef\u89c1";
        switch (position) {
            case joystick.COORDINATE_CARTESIAN /*0*/:
                this.s1_viable = vis;
                this.slider1_name = name;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u6ed1\u6761[\u7ea2\u8272]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u6ed1\u6761[\u7ea2\u8272]" + nosee);
                }
                this.slider1_value = Integer.valueOf(value).intValue();
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.slider1_name);
                ((User) this.myusers.get(position)).setvaule("\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider1_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F1 [Value] [checksum] AA");
                return;
            case joystick.COORDINATE_DIFFERENTIAL /*1*/:
                this.s2_viable = vis;
                this.slider2_name = name;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u6ed1\u6761[\u7eff\u8272]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u6ed1\u6761[\u7eff\u8272]" + nosee);
                }
                this.slider2_value = Integer.valueOf(value).intValue();
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.slider2_name);
                ((User) this.myusers.get(position)).setvaule("\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider2_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F1 [Value] [checksum] AA");
                return;
            case UIActivity.xconnected /*2*/:
                this.s3_viable = vis;
                this.slider3_name = name;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u6ed1\u6761[\u84dd\u8272]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u6ed1\u6761[\u84dd\u8272]" + nosee);
                }
                this.slider3_value = Integer.valueOf(value).intValue();
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.slider3_name);
                ((User) this.myusers.get(position)).setvaule("\u8303\u56f4: [Value] 0-" + String.valueOf(this.slider3_value) + " \u5e27\u683c\u5f0f:\r\nA5 5A 05 F1 [Value] [checksum] AA");
                return;
//            case UIActivity.xtransfing /*3*/:
//                this.LED1_viable = vis;
//                this.LED1_name = name;
//                if (vis) {
//                    ((User) this.myusers.get(position)).setkname("LED1[\u84dd\u8272]" + cansee);
//                } else {
//                    ((User) this.myusers.get(position)).setkname("LED1[\u84dd\u8272]" + nosee);
//                }
//                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.LED1_name);
//                return;
//            case UIActivity.xend /*4*/:
//                this.LED2_viable = vis;
//                this.LED2_name = name;
//                if (vis) {
//                    ((User) this.myusers.get(position)).setkname("LED2[\u7eff\u8272]" + cansee);
//                } else {
//                    ((User) this.myusers.get(position)).setkname("LED2[\u7eff\u8272]" + nosee);
//                }
//                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.LED2_name);
//                return;
            case UIActivity.idle /*5*/:
                this.LED3_viable = vis;
                this.LED3_name = name;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("LED3[\u7ea2\u8272]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("LED3[\u7ea2\u8272]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.LED3_name);
                return;
            case UIActivity.TCP_READ /*6*/:
                this.LED4_viable = vis;
                this.LED4_name = name;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("LED4[\u9ec4\u8272]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("LED4[\u9ec4\u8272]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.LED4_name);
                return;
            case UIActivity.TCP_CHANGE /*7*/:
                this.LED5_viable = vis;
                this.LED5_name = name;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("LED5[\u84dd\u8272]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("LED5[\u84dd\u8272]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.LED5_name);
                return;
            case R.styleable.Toolbar_contentInsetRight /*8*/:
                this.LED6_viable = vis;
                this.LED6_name = name;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("LED6[\u7eff\u8272]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("LED6[\u7eff\u8272]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.LED6_name);
                return;
            case R.styleable.Toolbar_contentInsetStartWithNavigation /*9*/:
                this.LED7_viable = vis;
                this.LED7_name = name;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("LED7[\u7ea2\u8272]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("LED7[\u7ea2\u8272]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.LED7_name);
                return;
//            case R.styleable.Toolbar_contentInsetEndWithActions /*10*/:
//                this.LED8_viable = vis;
//                this.LED8_name = name;
//                if (vis) {
//                    ((User) this.myusers.get(position)).setkname("LED8[\u9ec4\u8272]" + cansee);
//                } else {
//                    ((User) this.myusers.get(position)).setkname("LED8[\u9ec4\u8272]" + nosee);
//                }
//                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.LED8_name);
//                return;
            case R.styleable.Toolbar_popupTheme /*11*/:
                this.P1_viable = vis;
                this.partm1_name = name;
                this.partm1_scale = Float.valueOf(value).floatValue();
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [1]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [1]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.partm1_name);
                ((User) this.myusers.get(position)).setvaule("\u500d\u6570:" + String.valueOf(this.partm1_scale));
                return;
            case R.styleable.Toolbar_titleTextAppearance /*12*/:
                this.P2_viable = vis;
                this.partm2_name = name;
                this.partm2_scale = Float.valueOf(value).floatValue();
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [2]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [2]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.partm2_name);
                ((User) this.myusers.get(position)).setvaule("\u500d\u6570:" + String.valueOf(this.partm2_scale));
                return;
            case R.styleable.Toolbar_subtitleTextAppearance /*13*/:
                this.P3_viable = vis;
                this.partm3_name = name;
                this.partm3_scale = Float.valueOf(value).floatValue();
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [3]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [3]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.partm3_name);
                ((User) this.myusers.get(position)).setvaule("\u500d\u6570:" + String.valueOf(this.partm3_scale));
                return;
            case R.styleable.Toolbar_titleMargin /*14*/:
                this.P4_viable = vis;
                this.partm4_name = name;
                this.partm4_scale = Float.valueOf(value).floatValue();
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [4]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [4]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.partm4_name);
                ((User) this.myusers.get(position)).setvaule("\u500d\u6570:" + String.valueOf(this.partm4_scale));
                return;
            case R.styleable.Toolbar_titleMarginStart /*15*/:
                this.P5_viable = vis;
                this.partm5_name = name;
                this.partm5_scale = Float.valueOf(value).floatValue();
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [5]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [5]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.partm5_name);
                ((User) this.myusers.get(position)).setvaule("\u500d\u6570:" + String.valueOf(this.partm5_scale));
                return;
            case R.styleable.Toolbar_titleMarginEnd /*16*/:
                this.P6_viable = vis;
                this.partm6_name = name;
                this.partm6_scale = Float.valueOf(value).floatValue();
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [6]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u8fd4\u56de\u53c2\u6570 [6]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.partm6_name);
                ((User) this.myusers.get(position)).setvaule("\u500d\u6570:" + String.valueOf(this.partm6_scale));
                return;
            case R.styleable.Toolbar_titleMarginTop /*17*/:
                this.B1_viable = vis;
                this.button1_name = name;
                this.button1_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[1]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[1]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button1_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button1_send);
                return;
            case R.styleable.Toolbar_titleMarginBottom /*18*/:
                this.B2_viable = vis;
                this.button2_name = name;
                this.button2_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[2]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[2]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button2_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button2_send);
                return;
            case R.styleable.Toolbar_titleMargins /*19*/:
                this.B3_viable = vis;
                this.button3_name = name;
                this.button3_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[3]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[3]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button3_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button3_send);
                return;
            case R.styleable.Toolbar_maxButtonHeight /*20*/:
                this.B4_viable = vis;
                this.button4_name = name;
                this.button4_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[4]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[4]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button4_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button4_send);
                return;
//            case R.styleable.Toolbar_buttonGravity /*21*/:
//                this.B5_viable = vis;
//                this.button5_name = name;
//                this.button5_send = value;
//                if (vis) {
//                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[5]" + cansee);
//                } else {
//                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[5]" + nosee);
//                }
//                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button5_name);
//                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button5_send);
//                return;
            case R.styleable.Toolbar_collapseIcon /*22*/:
                this.B6_viable = vis;
                this.button6_name = name;
                this.button6_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[6]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[6]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button6_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button6_send);
                return;
            case R.styleable.Toolbar_collapseContentDescription /*23*/:
                this.B7_viable = vis;
                this.button7_name = name;
                this.button7_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[7]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[7]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button7_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button7_send);
                return;
            case R.styleable.Toolbar_navigationIcon /*24*/:
                this.B8_viable = vis;
                this.button8_name = name;
                this.button8_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[8]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[8]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button8_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button8_send);
                return;
            case R.styleable.Toolbar_navigationContentDescription /*25*/:
                this.B9_viable = vis;
                this.button9_name = name;
                this.button9_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[9]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[9]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button9_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button9_send);
                return;
            case R.styleable.Toolbar_logoDescription /*26*/:
                this.B10_viable = vis;
                this.button10_name = name;
                this.button10_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[10]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[10]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button10_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button10_send);
                return;
            case R.styleable.Toolbar_titleTextColor /*27*/:
                this.B11_viable = vis;
                this.button11_name = name;
                this.button11_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[11]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[11]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button11_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button11_send);
                return;
            case R.styleable.Toolbar_subtitleTextColor /*28*/:
                this.B12_viable = vis;
                this.button12_name = name;
                this.button12_send = value;
                if (vis) {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[12]" + cansee);
                } else {
                    ((User) this.myusers.get(position)).setkname("\u81ea\u5b9a\u4e49\u6309\u952e[12]" + nosee);
                }
                ((User) this.myusers.get(position)).setname("\u663e\u793a\u540d\u79f0 :" + this.button12_name);
                ((User) this.myusers.get(position)).setvaule("\u70b9\u51fb\u53d1\u9001:" + this.button12_send);
                return;
            default:
                return;
        }
    }

    public void Setdefaultdata() {
        Editor editor = getSharedPreferences("perference", 0).edit();
        editor.putString("slider1_name", "PID.P");
        editor.putString("slider2_name", "PID.I");
        editor.putString("slider3_name", "PID.D");
        editor.putInt("slider1_value", 255);
        editor.putInt("slider2_value", 255);
        editor.putInt("slider3_value", 255);
        editor.putString("LED1_name", "LED1");
        editor.putString("LED2_name", "LED2");
        editor.putString("LED3_name", "LED3");
        editor.putString("LED4_name", "LED4");
        editor.putString("LED5_name", "LED5");
        editor.putString("LED6_name", "LED6");
        editor.putString("LED7_name", "LED7");
        editor.putString("LED8_name", "LED8");
        editor.putString("partm1_name", "\u53c2\u65701");
        editor.putString("partm2_name", "\u53c2\u65702");
        editor.putString("partm3_name", "\u53c2\u65703");
        editor.putString("partm4_name", "\u53c2\u65704");
        editor.putString("partm5_name", "\u53c2\u65705");
        editor.putString("partm6_name", "\u53c2\u65706");
        editor.putFloat("partm1_scale", 1.0f);
        editor.putFloat("partm2_scale", 1.0f);
        editor.putFloat("partm3_scale", 1.0f);
        editor.putFloat("partm4_scale", 1.0f);
        editor.putFloat("partm5_scale", 1.0f);
        editor.putFloat("partm6_scale", 1.0f);
        editor.putString("button1_name", "\u6309\u952e1");
        editor.putString("button2_name", "\u6309\u952e2");
        editor.putString("button3_name", "\u6309\u952e3");
        editor.putString("button4_name", "\u6309\u952e4");
        editor.putString("button5_name", "\u6309\u952e5");
        editor.putString("button6_name", "\u6309\u952e6");
        editor.putString("button7_name", "\u6309\u952e7");
        editor.putString("button8_name", "\u6309\u952e8");
        editor.putString("button9_name", "\u6309\u952e9");
        editor.putString("button10_name", "\u6309\u952e10");
        editor.putString("button11_name", "\u6309\u952e11");
        editor.putString("button12_name", "\u6309\u952e12");
        editor.putString("button1_send", "A55A04B1B5AA");
        editor.putString("button2_send", "A55A04B2B6AA");
        editor.putString("button3_send", "A55A04B3B7AA");
        editor.putString("button4_send", "A55A04B4B8AA");
        editor.putString("button5_send", "A55A04B5B9AA");
        editor.putString("button6_send", "A55A04B6BAAA");
        editor.putString("button7_send", "A55A04B7BBAA");
        editor.putString("button8_send", "A55A04B8BCAA");
        editor.putString("button9_send", "A55A04B9BDAA");
        editor.putString("button10_send", "A55A04BABEAA");
        editor.putString("button11_send", "A55A04BBBFAA");
        editor.putString("button12_send", "A55A04BCC0AA");
        editor.putString("s1_viable", "true");
        editor.putString("s2_viable", "true");
        editor.putString("s3_viable", "true");
        editor.putString("LED1_viable", "true");
        editor.putString("LED2_viable", "true");
        editor.putString("LED3_viable", "true");
        editor.putString("LED4_viable", "true");
        editor.putString("LED5_viable", "true");
        editor.putString("LED6_viable", "true");
        editor.putString("LED7_viable", "true");
        editor.putString("LED8_viable", "true");
        editor.putString("P1_viable", "true");
        editor.putString("P2_viable", "true");
        editor.putString("P3_viable", "true");
        editor.putString("P4_viable", "true");
        editor.putString("P5_viable", "true");
        editor.putString("P6_viable", "true");
        editor.putString("B1_viable", "true");
        editor.putString("B2_viable", "true");
        editor.putString("B3_viable", "true");
        editor.putString("B4_viable", "true");
        editor.putString("B5_viable", "true");
        editor.putString("B6_viable", "true");
        editor.putString("B7_viable", "true");
        editor.putString("B8_viable", "true");
        editor.putString("B9_viable", "true");
        editor.putString("B10_viable", "true");
        editor.putString("B11_viable", "true");
        editor.putString("B12_viable", "true");
        editor.putString("isfrist", "NO");
        editor.commit();
    }

    public void writedata() {
        Editor editor = getSharedPreferences("perference", 0).edit();
        if (this.s1_viable) {
            editor.putString("s1_viable", "true");
        } else {
            editor.putString("s1_viable", "flase");
        }
        if (this.s2_viable) {
            editor.putString("s2_viable", "true");
        } else {
            editor.putString("s2_viable", "flase");
        }
        if (this.s3_viable) {
            editor.putString("s3_viable", "true");
        } else {
            editor.putString("s3_viable", "flase");
        }
        if (this.LED1_viable) {
            editor.putString("LED1_viable", "true");
        } else {
            editor.putString("LED1_viable", "flase");
        }
        if (this.LED2_viable) {
            editor.putString("LED2_viable", "true");
        } else {
            editor.putString("LED2_viable", "flase");
        }
        if (this.LED3_viable) {
            editor.putString("LED3_viable", "true");
        } else {
            editor.putString("LED3_viable", "flase");
        }
        if (this.LED4_viable) {
            editor.putString("LED4_viable", "true");
        } else {
            editor.putString("LED4_viable", "flase");
        }
        if (this.LED5_viable) {
            editor.putString("LED5_viable", "true");
        } else {
            editor.putString("LED5_viable", "flase");
        }
        if (this.LED6_viable) {
            editor.putString("LED6_viable", "true");
        } else {
            editor.putString("LED6_viable", "flase");
        }
        if (this.LED7_viable) {
            editor.putString("LED7_viable", "true");
        } else {
            editor.putString("LED7_viable", "flase");
        }
        if (this.LED8_viable) {
            editor.putString("LED8_viable", "true");
        } else {
            editor.putString("LED8_viable", "flase");
        }
        if (this.P1_viable) {
            editor.putString("P1_viable", "true");
        } else {
            editor.putString("P1_viable", "flase");
        }
        if (this.P2_viable) {
            editor.putString("P2_viable", "true");
        } else {
            editor.putString("P2_viable", "flase");
        }
        if (this.P3_viable) {
            editor.putString("P3_viable", "true");
        } else {
            editor.putString("P3_viable", "flase");
        }
        if (this.P4_viable) {
            editor.putString("P4_viable", "true");
        } else {
            editor.putString("P4_viable", "flase");
        }
        if (this.P5_viable) {
            editor.putString("P5_viable", "true");
        } else {
            editor.putString("P5_viable", "flase");
        }
        if (this.P6_viable) {
            editor.putString("P6_viable", "true");
        } else {
            editor.putString("P6_viable", "flase");
        }
        if (this.B1_viable) {
            editor.putString("B1_viable", "true");
        } else {
            editor.putString("B1_viable", "flase");
        }
        if (this.B2_viable) {
            editor.putString("B2_viable", "true");
        } else {
            editor.putString("B2_viable", "flase");
        }
        if (this.B3_viable) {
            editor.putString("B3_viable", "true");
        } else {
            editor.putString("B3_viable", "flase");
        }
        if (this.B4_viable) {
            editor.putString("B4_viable", "true");
        } else {
            editor.putString("B4_viable", "flase");
        }
        if (this.B5_viable) {
            editor.putString("B5_viable", "true");
        } else {
            editor.putString("B5_viable", "flase");
        }
        if (this.B6_viable) {
            editor.putString("B6_viable", "true");
        } else {
            editor.putString("B6_viable", "flase");
        }
        if (this.B7_viable) {
            editor.putString("B7_viable", "true");
        } else {
            editor.putString("B7_viable", "flase");
        }
        if (this.B8_viable) {
            editor.putString("B8_viable", "true");
        } else {
            editor.putString("B8_viable", "flase");
        }
        if (this.B9_viable) {
            editor.putString("B9_viable", "true");
        } else {
            editor.putString("B9_viable", "flase");
        }
        if (this.B10_viable) {
            editor.putString("B10_viable", "true");
        } else {
            editor.putString("B10_viable", "flase");
        }
        if (this.B11_viable) {
            editor.putString("B11_viable", "true");
        } else {
            editor.putString("B11_viable", "flase");
        }
        if (this.B12_viable) {
            editor.putString("B12_viable", "true");
        } else {
            editor.putString("B12_viable", "flase");
        }
        editor.putString("slider1_name", this.slider1_name);
        editor.putString("slider2_name", this.slider2_name);
        editor.putString("slider3_name", this.slider3_name);
        editor.putInt("slider1_value", this.slider1_value);
        editor.putInt("slider2_value", this.slider2_value);
        editor.putInt("slider3_value", this.slider3_value);
        editor.putString("LED1_name", this.LED1_name);
        editor.putString("LED2_name", this.LED2_name);
        editor.putString("LED3_name", this.LED3_name);
        editor.putString("LED4_name", this.LED4_name);
        editor.putString("LED5_name", this.LED5_name);
        editor.putString("LED6_name", this.LED6_name);
        editor.putString("LED7_name", this.LED7_name);
        editor.putString("LED8_name", this.LED8_name);
        editor.putString("partm1_name", this.partm1_name);
        editor.putString("partm2_name", this.partm2_name);
        editor.putString("partm3_name", this.partm3_name);
        editor.putString("partm4_name", this.partm4_name);
        editor.putString("partm5_name", this.partm5_name);
        editor.putString("partm6_name", this.partm6_name);
        editor.putFloat("partm1_scale", this.partm1_scale);
        editor.putFloat("partm2_scale", this.partm2_scale);
        editor.putFloat("partm3_scale", this.partm3_scale);
        editor.putFloat("partm4_scale", this.partm4_scale);
        editor.putFloat("partm5_scale", this.partm5_scale);
        editor.putFloat("partm6_scale", this.partm6_scale);
        editor.putString("button1_name", this.button1_name);
        editor.putString("button2_name", this.button2_name);
        editor.putString("button3_name", this.button3_name);
        editor.putString("button4_name", this.button4_name);
        editor.putString("button5_name", this.button5_name);
        editor.putString("button6_name", this.button6_name);
        editor.putString("button7_name", this.button7_name);
        editor.putString("button8_name", this.button8_name);
        editor.putString("button9_name", this.button9_name);
        editor.putString("button10_name", this.button10_name);
        editor.putString("button11_name", this.button11_name);
        editor.putString("button12_name", this.button12_name);
        editor.putString("button1_send", this.button1_send);
        editor.putString("button2_send", this.button2_send);
        editor.putString("button3_send", this.button3_send);
        editor.putString("button4_send", this.button4_send);
        editor.putString("button5_send", this.button5_send);
        editor.putString("button6_send", this.button6_send);
        editor.putString("button7_send", this.button7_send);
        editor.putString("button8_send", this.button8_send);
        editor.putString("button9_send", this.button9_send);
        editor.putString("button10_send", this.button10_send);
        editor.putString("button11_send", this.button11_send);
        editor.putString("button12_send", this.button12_send);
        editor.putString("isfrist", "NO");
        editor.commit();
    }

    public void readdata() {
        SharedPreferences config = getSharedPreferences("perference", 0);
        if (config.getString("s1_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.s1_viable = false;
        } else {
            this.s1_viable = true;
        }
        if (config.getString("s2_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.s2_viable = false;
        } else {
            this.s2_viable = true;
        }
        if (config.getString("s3_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.s3_viable = false;
        } else {
            this.s3_viable = true;
        }
        if (config.getString("LED1_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.LED1_viable = false;
        } else {
            this.LED1_viable = true;
        }
        if (config.getString("LED2_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.LED2_viable = false;
        } else {
            this.LED2_viable = true;
        }
        if (config.getString("LED3_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.LED3_viable = false;
        } else {
            this.LED3_viable = true;
        }
        if (config.getString("LED4_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.LED4_viable = false;
        } else {
            this.LED4_viable = true;
        }
        if (config.getString("LED5_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.LED5_viable = false;
        } else {
            this.LED5_viable = true;
        }
        if (config.getString("LED6_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.LED6_viable = false;
        } else {
            this.LED6_viable = true;
        }
        if (config.getString("LED7_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.LED7_viable = false;
        } else {
            this.LED7_viable = true;
        }
        if (config.getString("LED8_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.LED8_viable = false;
        } else {
            this.LED8_viable = true;
        }
        if (config.getString("P1_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.P1_viable = false;
        } else {
            this.P1_viable = true;
        }
        if (config.getString("P2_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.P2_viable = false;
        } else {
            this.P2_viable = true;
        }
        if (config.getString("P3_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.P3_viable = false;
        } else {
            this.P3_viable = true;
        }
        if (config.getString("P4_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.P4_viable = false;
        } else {
            this.P4_viable = true;
        }
        if (config.getString("P5_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.P5_viable = false;
        } else {
            this.P5_viable = true;
        }
        if (config.getString("P6_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.P6_viable = false;
        } else {
            this.P6_viable = true;
        }
        if (config.getString("B1_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B1_viable = false;
        } else {
            this.B1_viable = true;
        }
        if (config.getString("B2_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B2_viable = false;
        } else {
            this.B2_viable = true;
        }
        if (config.getString("B3_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B3_viable = false;
        } else {
            this.B3_viable = true;
        }
        if (config.getString("B4_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B4_viable = false;
        } else {
            this.B4_viable = true;
        }
        if (config.getString("B5_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B5_viable = false;
        } else {
            this.B5_viable = true;
        }
        if (config.getString("B6_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B6_viable = false;
        } else {
            this.B6_viable = true;
        }
        if (config.getString("B7_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B7_viable = false;
        } else {
            this.B7_viable = true;
        }
        if (config.getString("B8_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B8_viable = false;
        } else {
            this.B8_viable = true;
        }
        if (config.getString("B9_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B9_viable = false;
        } else {
            this.B9_viable = true;
        }
        if (config.getString("B10_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B10_viable = false;
        } else {
            this.B10_viable = true;
        }
        if (config.getString("B11_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B11_viable = false;
        } else {
            this.B11_viable = true;
        }
        if (config.getString("B12_viable", BuildConfig.FLAVOR).equals("flase")) {
            this.B12_viable = false;
        } else {
            this.B12_viable = true;
        }
        this.slider1_name = config.getString("slider1_name", BuildConfig.FLAVOR);
        this.slider2_name = config.getString("slider2_name", BuildConfig.FLAVOR);
        this.slider3_name = config.getString("slider3_name", BuildConfig.FLAVOR);
        this.slider1_value = config.getInt("slider1_value", 255);
        this.slider2_value = config.getInt("slider2_value", 255);
        this.slider3_value = config.getInt("slider3_value", 255);
        this.LED1_name = config.getString("LED1_name", BuildConfig.FLAVOR);
        this.LED2_name = config.getString("LED2_name", BuildConfig.FLAVOR);
        this.LED3_name = config.getString("LED3_name", BuildConfig.FLAVOR);
        this.LED4_name = config.getString("LED4_name", BuildConfig.FLAVOR);
        this.LED5_name = config.getString("LED5_name", BuildConfig.FLAVOR);
        this.LED6_name = config.getString("LED6_name", BuildConfig.FLAVOR);
        this.LED7_name = config.getString("LED7_name", BuildConfig.FLAVOR);
        this.LED8_name = config.getString("LED8_name", BuildConfig.FLAVOR);
        this.partm1_name = config.getString("partm1_name", BuildConfig.FLAVOR);
        this.partm2_name = config.getString("partm2_name", BuildConfig.FLAVOR);
        this.partm3_name = config.getString("partm3_name", BuildConfig.FLAVOR);
        this.partm4_name = config.getString("partm4_name", BuildConfig.FLAVOR);
        this.partm5_name = config.getString("partm5_name", BuildConfig.FLAVOR);
        this.partm6_name = config.getString("partm6_name", BuildConfig.FLAVOR);
        this.partm1_scale = config.getFloat("partm1_scale", 0.0f);
        this.partm2_scale = config.getFloat("partm2_scale", 0.0f);
        this.partm3_scale = config.getFloat("partm3_scale", 0.0f);
        this.partm4_scale = config.getFloat("partm4_scale", 0.0f);
        this.partm5_scale = config.getFloat("partm5_scale", 0.0f);
        this.partm6_scale = config.getFloat("partm6_scale", 0.0f);
        this.button1_name = config.getString("button1_name", BuildConfig.FLAVOR);
        this.button2_name = config.getString("button2_name", BuildConfig.FLAVOR);
        this.button3_name = config.getString("button3_name", BuildConfig.FLAVOR);
        this.button4_name = config.getString("button4_name", BuildConfig.FLAVOR);
        this.button5_name = config.getString("button5_name", BuildConfig.FLAVOR);
        this.button6_name = config.getString("button6_name", BuildConfig.FLAVOR);
        this.button7_name = config.getString("button7_name", BuildConfig.FLAVOR);
        this.button8_name = config.getString("button8_name", BuildConfig.FLAVOR);
        this.button9_name = config.getString("button9_name", BuildConfig.FLAVOR);
        this.button10_name = config.getString("button10_name", BuildConfig.FLAVOR);
        this.button11_name = config.getString("button11_name", BuildConfig.FLAVOR);
        this.button12_name = config.getString("button12_name", BuildConfig.FLAVOR);
        this.button1_send = config.getString("button1_send", BuildConfig.FLAVOR);
        this.button2_send = config.getString("button2_send", BuildConfig.FLAVOR);
        this.button3_send = config.getString("button3_send", BuildConfig.FLAVOR);
        this.button4_send = config.getString("button4_send", BuildConfig.FLAVOR);
        this.button5_send = config.getString("button5_send", BuildConfig.FLAVOR);
        this.button6_send = config.getString("button6_send", BuildConfig.FLAVOR);
        this.button7_send = config.getString("button7_send", BuildConfig.FLAVOR);
        this.button8_send = config.getString("button8_send", BuildConfig.FLAVOR);
        this.button9_send = config.getString("button9_send", BuildConfig.FLAVOR);
        this.button10_send = config.getString("button10_send", BuildConfig.FLAVOR);
        this.button11_send = config.getString("button11_send", BuildConfig.FLAVOR);
        this.button12_send = config.getString("button12_send", BuildConfig.FLAVOR);
    }

    public void loaddata() {
        if (getSharedPreferences("perference", 0).getString("isfrist", BuildConfig.FLAVOR).equals("NO")) {
            readdata();
            return;
        }
        Setdefaultdata();
        readdata();
    }
}
